package com.example.sangong.service;

import com.example.sangong.req.attachment.AttachmentUrlReq;
import com.example.sangong.resp.AttachmentUploadRsp;
import com.example.sangong.resp.AttachmentUrlResp;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface AttachmentService {
    /**
     * 上传文件
     * @param file
     * @return
     */
    AttachmentUploadRsp uploadFile(MultipartFile file);

    /**
     * 文件批量上传
     * @param files
     * @return
     */
    List<AttachmentUploadRsp> batchUpload(List<MultipartFile> files);

    /**
     * 获取附件访问地址
     * @param attachmentUrlReq
     * @return
     */
    List<AttachmentUrlResp> getAttachmentUrls(AttachmentUrlReq attachmentUrlReq);
}
